<template>
  <div class="flex-center">
    <Icon icon="ep:expand" :size="22" class="mr5px cursor-pointer" @click="chooseApp" />
    <el-breadcrumb :separator-icon="ArrowRight">
      <el-breadcrumb-item v-for="(item, i) in breadcrumbs" :key="i">
      <ElButton link :disabled="i === breadcrumbs.length - 1" @click="setBreadcrumbs(item.type, item.node)">{{ item.label }}</ElButton>
    </el-breadcrumb-item>
    </el-breadcrumb>
  </div>
</template>
<script setup lang="ts">
  import { ElBreadcrumb, ElBreadcrumbItem, ElButton } from 'element-plus';
  import { ArrowRight } from '@element-plus/icons-vue';
  import { Icon } from '@/components/Icon';
  import {  setBreadcrumbs, breadcrumbs } from '@/views/seed-dev';
  import { open } from '@/components/Popup';
  import { AppList } from '../../MyApp';

  function chooseApp() {
    open({title: '选择应用'}, AppList)
  }
</script>